package com.bdqn.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bdqn.dao.ProviderDao;
import com.bdqn.entity.Provider;
import com.bdqn.service.ProviderService;

@Service("providerService")
public class ProviderServiceImpl implements ProviderService {

	@Autowired
	private ProviderDao providerDao;

	public List<Provider> getList(String name, String description, int first,
			int maxResult) {
		return providerDao.getList(name, description, first, maxResult);
	}

	public int getCount(String name, String description) {
		return providerDao.getCount(name, description);
	}

	public void add(Provider provider) {
		providerDao.add(provider);
	}

	public Provider getById(int id) {
		return providerDao.getById(id);
	}

	public void update(Provider provider) {
		providerDao.update(provider);
	}

	public void del(int id) {
		providerDao.del(id);
	}

}
